#include <iostream>
#include <vector>
#include <string>
#include <unordered_map>
#include <queue>

using namespace std;

int main()
{
    int i = s.size() - 1;
    int j = t.size() - 1;
    int add = 0;
    string retstr = "";
    while (i >= 0 || j >= 0 || add != 0)
    {
        int x = i < 0 ? 0 : s[i] - '0';
        int y = j < 0 ? 0 : t[j] - '0';
        int tmp = add + x + y;
        add = tmp / 10;
        retstr.push_back('0' + tmp % 10);
        i--;
        j--;
    }
    reverse(retstr.begin(), retstr.end());
    return retstr;
}

struct ListNode {
    int val;
    struct ListNode* next;
    ListNode(int x)
        : val(x)
        , next(nullptr)
    {}
};

int main()
{
    ListNode* cur1 = head1;
    ListNode* cur2 = head2;
    list<int> list1;
    list<int> list2;
    list<int> retlist;
    while (cur1)
    {
        list1.push_back(cur1->val);
        cur1 = cur1->next;
    }
    while (cur2)
    {
        list2.push_back(cur2->val);
        cur2 = cur2->next;
    }
    auto endsign1 = --list1.begin();
    auto endsign2 = --list2.begin();
    auto it1 = --list1.end();
    auto it2 = --list2.end();
    int add = 0;
    while (it1 != endsign1 || it2 != endsign2 || add) {
        int x = it1 == endsign1 ? 0 : *it1;
        int y = it2 == endsign2 ? 0 : *it2;
        int digit = x + y + add;
        add = digit / 10;
        retlist.push_back(digit % 10);
        if (it1 != endsign1) { --it1; }
        if (it2 != endsign2) { --it2; }
    }
    auto endsign = --retlist.begin();
    auto it = --retlist.end();
    ListNode* ret = new ListNode(0);
    ListNode* cur = ret;
    while (it != endsign)
    {
        ListNode* tmp = new ListNode(*it);
        ret->next = tmp;
        ret = ret->next;
        --it;
    }
    return cur->next;
}


string multiply(string s1, string s2)
{
    reverse(s1.begin(), s1.end());
    reverse(s2.begin(), s2.end());
    int m = s1.size(), n = s2.size();
    vector<int> tmpret(m + n);
    string ret;
    for (int i = 0; i < m; i++) {
        for (int j = 0; j < n; j++) {
            tmpret[i + j] += (s1[i] - '0') * (s2[j] - '0');
        }
    }

    int carry = 0;
    for (int i = 0; (i < tmpret.size()) || carry; i++) {
        int curnum = i < 0 ? carry : tmpret[i] + carry;
        carry = curnum / 10;
        ret += (curnum % 10) + '0';
    }
    int cur = ret.size() - 1;
    while (ret.size() > 1 && ret[cur] == '0')
    {
        ret.pop_back();
        cur--;
    }

    std::reverse(ret.begin(), ret.end());
    return ret;
}

int main()
{
    string s1, s2;
    cin >> s1 >> s2;
    cout << multiply(s1, s2) << endl;
    return 0;
}



